package com.migration.model.olddb;

import jakarta.persistence.*;
import lombok.Data;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * 事故链措施关系表 实体类
 * 表名：ra_fault_chains_measure
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "ra_fault_chains_measure")
public class RaFaultChainsMeasure implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 事故链主键
     */
    @Column(name = "linked_id", nullable = false)
    private Long linkedId;
    
    /**
     * 措施主键
     */
    @Column(name = "measures_id", nullable = false)
    private Long measuresId;
    
    /**
     * 措施类型（1、防护 2、建议）
     * 默认值: 1
     */
    @Column(name = "measures_type", nullable = false)
    private Byte measuresType;
    
    /**
     * 来源主键
     */
    @Column(name = "source_id", nullable = false)
    private Long sourceId;
    
    /**
     * 来源类型（1、影响 2、后果）
     * 默认值: 1
     */
    @Column(name = "source_type", nullable = false)
    private Byte sourceType;
    
    /**
     * 措施状态（0、初始化 1、有效 2、手动有效 3、无效）
     * 默认值: 0
     */
    @Column(name = "status", nullable = false)
    private Byte status;
    
    /**
     * 无效备注
     */
    @Column(name = "invalid_remark", length = 255)
    private String invalidRemark;
    
    /**
     * 是否在其它事故链使用（0、否 1、是）
     * 默认值: 0
     */
    @Column(name = "used_fault_chains", nullable = false)
    private Byte usedFaultChains;
    
    /**
     * 创建时间
     * 默认值: CURRENT_TIMESTAMP
     */
    @Column(name = "create_time", nullable = false)
    private java.time.LocalDateTime createTime;
    
    @Override
    public String toString() {
        return "RaFaultChainsMeasure{" +
            "id=" + id +
            ", linkedId=" + linkedId +
            ", measuresId=" + measuresId +
            ", measuresType=" + measuresType +
            ", sourceId=" + sourceId +
            ", sourceType=" + sourceType +
            ", status=" + status +
            ", invalidRemark=" + invalidRemark +
            ", usedFaultChains=" + usedFaultChains +
            ", createTime=" + createTime +
        '}';
    }
} 